<!doctype html>
<html>
<head>
    <title>Pay test</title>
    <style type="text/css">
      body {
        margin: 20px;
      }
      div.wrapper {
        margin: 0 auto;
        max-width: 800px;
        text-align: center;
        font-style: italic;
      }
    </style>
</head>
<body>
<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.min.js"></script>
<script>
window.onload;
    function ready(callback) {
  // 如果jsbridge已经注入则直接调用
  if (window.AlipayJSBridge) {
    callback && callback();
  } else {
    // 如果没有注入则监听注入的事件
    document.addEventListener('AlipayJSBridgeReady', callback, false);
  }
}


ready(function () {
  var options = {"tradeNO":'2022061522001445701434406871'};
AlipayJSBridge.call('tradePay', options ,function(result){
if(result.resultCode == '9000'){
//location.href="";//支付成功后跳转处理
   alert('success');
}else{
alert('pay fail');
}
});

<!--document.querySelector('.tradeno').addEventListener('click', function() {-->
<!--    AlipayJSBridge.call("tradePay", {-->
<!--      tradeNO: "2022061522001445701434406871"-->
<!--    }, function(result) {-->
<!--      alert(JSON.stringify(result));-->
<!--    });-->
<!--  });-->
<!--});-->

</script>
</body>
</html>